public class T {
}
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别

        String str = in.next();
        int newcount = 0;
        int count = 0;
        int i = 0;
        StringBuffer string = new StringBuffer();
        StringBuffer newstring = new StringBuffer();

        while (i < str.length()) {
            char a = str.charAt(i);
            if ('0' <= a && a <= '9') {
                newstring.append(a);
                newcount++;
            } else {


                if (count == 0 || newcount > count) {

                    count = newcount;
                    string = newstring;
                }

                newcount = 0;
                newstring = new StringBuffer();

            }

            i++;
        }

        if (count == 0 || newcount > count) {


            string = newstring;
        }

        System.out.println(string.toString());

    }
}


import java.util.*;


public class Solution {
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * 判断岛屿数量
     * @param grid char字符型二维数组
     * @return int整型
     */

    int count=0;
    public int solve (char[][] grid) {
        // write code here

        for(int i=0;i<grid.length;i++){
            for(int j=0;j<grid[0].length;j++){
                if(grid[i][j]=='1'){
                    func1(grid,i,j);
                    count++;
                }

            }
        }






        return count;
    }


    private void func1(char[][] grid,int row,int col){

        if(row<0||row>=grid.length||col<0||col>=grid[0].length||grid[row][col]=='0'){
            return;
        }

        grid[row][col]='0';
        func1(grid,row-1,col);
        func1(grid,row+1,col);
        func1(grid,row,col-1);
        func1(grid,row,col+1);



    }
}